package org.wdh.extend.visitor;

public class TreePrinterTestDriver {
	public static void main(String[] args) {
		//left branch
		Leaf leaf = new Leaf();
		//NonEmptyLeaf eyLeaf = new NonEmptyLeaf(4);
		Branch leftBranch1_1 = new Branch(4, leaf, leaf);
		Branch rightBranch1_2 = new Branch(3, leaf, leaf);
		Branch leftBranch1 = new Branch(2, leftBranch1_1, rightBranch1_2);
		Branch leftBranch = new Branch(1, leftBranch1, leaf);
		
		TreePrinter tp = new TreePrinter();
		tp.forBranch(leftBranch);
		
		System.out.println("Copy Branch for Right Branch");
		
		//copy branch
		TreeCopier tc = new TreeCopier();
		Branch rightBranh = (Branch)tc.forBranch(leftBranch);
		
		tp.forBranch(rightBranh);
	}
}
